The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for performing memory transfer optimization of network adapter data placement when performing header-data split operations.
Network data traffic is normally comprised of data frames which are prepended by protocol headers. Protocol headers provide information required by different protocol layers to properly process data frames as they move through the network fabric. In order to provide greater optimization, a network service provider, such as an Ethernet adapter or other network adapter, may implement a header-data split function so that the data and protocol headers can be placed in separate host memory locations. This allows separate processing of the headers from the data, or payload, of the frames.
Network adapters supporting receive path header-data split do so by performing separate and distinct Direct Memory Access (DMA) write operations to host memory. In known header-data split operations, one DMA write operation contains only the frame headers which are placed in host memory location A, which is reserved for the frame header, and subsequent DMA write operation(s) to write the frame data (or payload) in other host memory location(s) B, C, D, etc., which are reserved for the frame data.
FIG. 1 is a diagram of a known header-data split architecture that utilizes the Network Driver Interface Specification (NDIS). As shown in FIG. 1, a Network Interface Card (NIC) 110 and NDIS protocol engine 120 are provided. The NIC 110 comprises a miniport adapter driver 130 and header-data split provider 140. The miniport adapter driver 130 receives configuration information from NDIS protocol engine 120 to set up the NIC 110 for header-data split receive operations. In addition, the miniport adapter driver 130 exposes the NIC 110 services to NDIS protocol engine 120 for runtime operations such as send and receive operations.
The NIC 110, configured for header-data split operations, receives Ethernet frames and splits the headers and data into separate receive buffers. The miniport adapter driver 130 uses NDIS receive function to indicate the received data to the NDIS protocol engine 120 and also assigns a NET_BUFFER structure to a NET_BUFFER_LIST structure when indicating received data. For header-data split, the NET_BUFFER structures in the receive indications split the received Ethernet frame by using separate memory descriptor lists (MDLs) for the header and the data. In addition, the NET_BUFFER_LIST structure contains header-data split information in the NET_BUFFER_LIST information.
FIG. 2 is an example diagram illustrating a received frame, split buffers, and a memory layout of the header buffers in accordance with known header-data split architectures. As shown in FIG. 2, the received frame 210 comprises a header 212 and a data portion 214 (or payload). The frame 210 is split to generate split frame 220 in which the header 212 of the frame 210 is separated and stored in a header buffer 222 and the data 214 or payload is stored in one or more data buffers 224. As shown in FIG. 2, the header buffers 222 may be provided in a contiguous block of storage in a header memory portion 230 of host memory. The data buffers 224 for storing the data 214 need not be in a contiguous block of storage of a data memory portion 240.